package create.factory.impl;

import create.factory.Sender;

public class SenderFactory {
	
	public Sender produce(String type) {
		if ("mail".equals(type)) {
			return new MailSender();
		} else if ("sms".equals(type)) {
			return new SmsSender();
		}
		System.out.println("请输入正确的类型");
		return null;
	}
	
	public Sender produceMail(){
		return new MailSender();
	}
	
	public Sender produceSms(){
		return new SmsSender();
	}
	
	public static Sender produceMail2(){
		return new MailSender();
	}
	
	public static Sender produceSms2(){
		return new SmsSender();
	}
}
